﻿<Window x:Class="RL.wPersonInfo"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:RL"
        Title="Информация о сотруднике" Height="321" Width="582" Loaded="Window_Loaded">
    <Window.Resources>
        <local:person x:Key="personData" />
        <CollectionViewSource x:Key="dataCharact"/>
        <DataTemplate DataType="{x:Type local:driver}">
            <local:ucDriver Data="{Binding}"/>
        </DataTemplate> 
    </Window.Resources>
    <Grid DataContext="{Binding Source={StaticResource personData}}" Name="mainGrid">
        <TabControl Name="tabControl1">
            <TabItem Header="Основное" Name="tabItemMain">
                <Grid Name="gridMain">
                    <Label Content="Табельный номер" Height="28" HorizontalAlignment="Left" Margin="8,6,0,0" Name="label1" VerticalAlignment="Top" />
                    <Label Content="Ф.И.О." Height="28" HorizontalAlignment="Left" Margin="8,40,0,0" Name="label2" VerticalAlignment="Top" />
                    <TextBox Height="23" HorizontalAlignment="Left" Margin="138,11,0,0" Name="textBox1" VerticalAlignment="Top" Width="216" Text="{Binding Path=tabel}"/>
                    <TextBox Height="23" HorizontalAlignment="Left" Margin="138,45,0,0" Name="textBox2" VerticalAlignment="Top" Width="216" Text="{Binding Path=fio}"/>
                    <GroupBox Header="Должность" Height="137" HorizontalAlignment="Left" Margin="9,74,0,0" Name="groupBox1" VerticalAlignment="Top" Width="157">
                        <Grid Width="145">
                            <CheckBox Content="Водитель" Height="16" HorizontalAlignment="Left" Margin="6,6,0,0" Name="checkBoxDriver" VerticalAlignment="Top" Checked="checkBoxDriver_Checked" Unchecked="checkBoxDriver_Unchecked" />
                            <CheckBox Content="Диспетчер" Height="16" HorizontalAlignment="Left" Margin="6,28,0,0" Name="checkBoxDispetcher" VerticalAlignment="Top" Unchecked="checkBoxDispetcher_Unchecked" Checked="checkBoxDispetcher_Checked" />
                            <CheckBox Content="Механик" Height="16" HorizontalAlignment="Left" Margin="6,50,0,0" Name="checkBoxMechanic" VerticalAlignment="Top" Unchecked="checkBoxMechanic_Unchecked" Checked="checkBoxMechanic_Checked" />
                            <CheckBox Content="Оператор АЗС" Height="16" HorizontalAlignment="Left" Margin="6,72,0,0" Name="checkBoxOperatorFuel" VerticalAlignment="Top" Unchecked="checkBoxOperatorFuel_Unchecked" Checked="checkBoxOperatorFuel_Checked_1" />
                        </Grid>
                    </GroupBox>
                </Grid>
            </TabItem>
            <TabItem Header="Характеристики" Name="tabItemCharact">
                <ListBox ItemsSource="{Binding Source={StaticResource dataCharact}}" Name="ccr">
                    <ListBox.ItemTemplate>
                        <DataTemplate DataType="{x:Type local:driver}">
                            <local:ucDriver Data="{Binding}" />
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                    <!--<local:ucDriver Data="{Binding Source}" />-->
                </ListBox>
            </TabItem>
        </TabControl>
    </Grid>
</Window>
